#ifndef QCWANALOGCLOCK_H
#define QCWANALOGCLOCK_H

#include <QWidget>

class Q_DECL_EXPORT QcwAnalogClock : public QWidget
{
Q_OBJECT
	Q_PROPERTY(QColor crownColor READ crownColor WRITE setCrownColor);
	Q_PROPERTY(QColor foreground READ foreground WRITE setForeground);
	Q_PROPERTY(QColor background READ background WRITE setBackground);
	Q_PROPERTY(QColor hourHandColor READ hourHandColor WRITE setHourHandColor);
	Q_PROPERTY(QColor minHandColor READ minHandColor WRITE setMinHandColor);
	Q_PROPERTY(QColor secHandColor READ secHandColor WRITE setSecHandColor);
	Q_PROPERTY(bool numericIndicatorEnabled READ isNumericIndicatorEnabled WRITE setNumericIndicatorEnabled);
	
public:
	explicit QcwAnalogClock(QWidget *parent = 0);
	QColor crownColor() const {return m_crownColor;}
    QColor foreground() const {return m_foreground;}
    QColor background() const {return m_background;}
	QColor hourHandColor() const {return m_hourHandColor;}
	QColor minHandColor() const {return m_minHandColor;}
	QColor secHandColor() const {return m_secHandColor;}
	bool isNumericIndicatorEnabled() const { return m_numericIndicatorEnabled;}

Q_SIGNALS:
		
public Q_SLOTS:
	void setCrownColor(QColor);
	void setForeground(QColor);
	void setBackground(QColor);
	void setHourHandColor(QColor);
	void setMinHandColor(QColor);
	void setSecHandColor(QColor);
	void setNumericIndicatorEnabled(bool);

protected:
	void paintEvent(QPaintEvent *event);
	void drawCrown(QPainter *painter);
	void drawBackground(QPainter *painter);
	void drawScale(QPainter *painter);
	void drawScaleNum(QPainter *painter);
	void drawIndicator(QPainter *painter);
	void drawNumericValue(QPainter *painter);
	
private:	
	QColor m_crownColor;
	QColor m_foreground;
	QColor m_background;
	QColor m_hourHandColor;
	QColor m_minHandColor;
	QColor m_secHandColor;
	bool m_numericIndicatorEnabled;
};

#endif
